function confirmDelete(url, name) {
    var dialog = new Widget.Dialog;
    dialog.confirm('「' + name + '」を削除しますか。', {
        width: 300,
        height: 85,
        onOk: function(val) {
            window.location = url;
        }
    });
}

var Color= new Array();
Color[1] = "ff";
Color[2] = "ee";
Color[3] = "dd";
Color[4] = "cc";
Color[5] = "bb";
Color[6] = "aa";
Color[7] = "99";

function WaitToFade() {
    if (document.getElementById('fade')) {
        setTimeout("FadeIn(7)", 1000);
    }
}

function FadeIn(where) {
    if (where >= 1) {
        document.getElementById('fade').style.backgroundColor = "#ffff" + Color[where];
        if (where > 1) {
            where -= 1;
            setTimeout("FadeIn("+where+")", 200);
        } else {
            where -= 1;
            setTimeout("FadeIn("+where+")", 200);
            document.getElementById('fade').style.backgroundColor = "transparent";
        }
    }
}

function SetTag(tag){
    var value = document.getElementById('tags').value;
    if ( value ) {
        value += ', ' + tag;
    } else {
        value = tag;
    }
    document.getElementById('tags').value = value;
}
